﻿/**

ME      ME TMEETMEE  EETMEETM  TMEETMEETM
MEE    TME TM        EE            TM
ME T  E ME TM        EE            TM
ME  ME  ME TMEETME   EETMEET       TM
ME      ME TM        EE            TM
ME      ME TM        EE            TM
ME      ME TMEETMEET EEMEETMEE     TM
_______________________________________________________
 Meet Online - Copyright 2007(c) Ruben Sainz de la Maza
 
	@class: 	Meet
	@vertion: 	0.1
	@date:		01/02/08
				
	@language: 	ActionScript 3.0
	@author:	Ruben Sainz de la Maza
	@usage: 
		import com.conelmate.meet.Meet;
		var objMeet:Meet = Meet.getInstance();
		objMeet.init();

**/


package com.conelmate.meet
{
	import com.conelmate.util.Trace;
	
	import flash.display.StageScaleMode;
	import flash.display.StageAlign;
	import flash.system.System;
	import flash.display.Sprite;
	import flash.events.Event;
	

	public class Meet extends Trace
	{	
		/* Permite al motor recuperar el nombre del juego o cuando se decompila. */
		static 	public 	const NAME     		:String = 'Meet Online';

		/* Permite al motor recuperar la version del juego o cuando se decompila. */
		static 	public 	const VERSION  		:String = '0.1';

		/* Permite al motor recuperar la fecha del juego o cuando se decompila. */
		static 	public 	const DATE     		:String = '10.10.07';

		/* Permite al motor recuperar el nombre de autor o cuando se decompila. */
		static 	public 	const AUTHOR   		:String = '(c) 2007 Copyright by Ruben Sainz de la Maza';
		
		static	private var _objApp			:App;
		
				private var _stage			:Sprite;
		
		
//_________________________________________________________________________________ Constructor	

		public function Meet()
		{
			_isTrace = true;
			mTrace("#Meet# constructor");
			
			System.useCodePage = true;
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;
			
			_stage = new Sprite();
			_stage.graphics.beginFill("0xFFCC00", 0);
            _stage.graphics.drawRect(0, 0, 5, 5);
            _stage.graphics.endFill();
			addChild(_stage);
			stage.addEventListener(Event.RESIZE, resizeStage);
			resizeStage(null);
			
			init();
		}


//_________________________________________________________________________________ Public Methods

		
		/**
		 * inicializar
		 */		
		public function init():void
		{
			mTrace("#Meet# init");
			
			//tipos de conferencia:  live, recorded
			
			_objApp = App.getInstance();
			_objApp.init(this);
		}
		
		
		/**
		 * destruir objetos y variables
		 */	
		public function destroy():void
		{
			mTrace("#Meet# destroy");
			_objApp.destroy();
		}		
		
//_________________________________________________________________________________ Private Methods


		/**
		* modifica en ancho y alto del sprite _stage respecto al Stage 
		*/
		private function resizeStage(e:Event = null):void
		{
			_stage.x = 0;
			_stage.y = 0;
			_stage.width = stage.stageWidth;
			_stage.height = stage.stageHeight;
		}
		
//_________________________________________________________________________________ SETTERS



//_________________________________________________________________________________ GETTERS



	}
}